package com.css.fxfzysx.modules.ysxManagement.controller;

import com.css.fxfzysx.base.response.RestResponse;
import com.css.fxfzysx.modules.ysxManagement.service.RcStructureService;
import com.css.fxfzysx.modules.ysxManagement.vo.CStructureCiVo;
import com.css.fxfzysx.modules.ysxManagement.vo.CsValueVo;
import com.css.fxfzysx.modules.ysxManagement.vo.MsCoefficientVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 钢筋混凝土结构
 */
@RestController
@RequestMapping("/rcStructure")
public class RcStructureController {

    @Autowired
    private RcStructureService rcStructureService;

    /**
     * 钢筋混凝土结构房屋修正系数Ci值添加或修改
     * @return
     */
    @PostMapping("/saverOrUpdateCStructureCi")
    public RestResponse saverOrUpdateCStructureCi(@RequestBody CStructureCiVo cStructureCiVo){
        return rcStructureService.saverOrUpdateCStructureCi(cStructureCiVo);
    }

    /**
     * 钢筋混凝土结构房屋修正系数Ci值查询
     * @return
     */
    @GetMapping("/getAllCStructureCi")
    public RestResponse getAllCStructureCi(String titleName){
        return rcStructureService.getAllCStructureCi(titleName);
    }

    /**
     * 钢筋混凝土结构房屋修正系数Ci值删除
     * @return
     */
    @GetMapping("/deleteCStructureCiById")
    public RestResponse deleteCStructureCiById(String cStructureCiIds,String arrangeIds){
        return rcStructureService.deleteCStructureCiById(cStructureCiIds,arrangeIds);
    }

    /**
     * 砌体强度的正压力影响系数添加或修改
     * @return
     */
    @PostMapping("/saverOrUpdateMsCoefficient")
    public RestResponse saverOrUpdateMsCoefficient(@RequestBody MsCoefficientVo msCoefficientVo){
        return rcStructureService.saverOrUpdateMsCoefficient(msCoefficientVo);
    }

    /**
     * 砌体强度的正压力影响系数查询
     * @return
     */
    @GetMapping("/getAllMsCoefficient")
    public RestResponse getAllMsCoefficient(String titleName){
        return rcStructureService.getAllMsCoefficient(titleName);
    }

    /**
     * 砌体强度的正压力影响系数删除
     * @return
     */
    @GetMapping("/deleteMsCoefficientById")
    public RestResponse deleteMsCoefficientById(String msCoefficientIds,String arrangeIds){
        return rcStructureService.deleteMsCoefficientById(msCoefficientIds,arrangeIds);
    }

    /**
     * 砌体非抗震设计的抗剪强度设计值添加或修改
     * @param csValueVo
     * @return
     */
    @PostMapping("saveOrUpdateCsValue")
    public RestResponse saveOrUpdateCsValue(@RequestBody CsValueVo csValueVo){
        return rcStructureService.saveOrUpdateCsValue(csValueVo);
    }

    /**
     * 砌体非抗震设计的抗剪强度设计值查询
     * @param titleName
     * @return
     */
    @GetMapping("getAllCsValue")
    public RestResponse getAllCsValue(String titleName){
        return rcStructureService.getAllCsValue(titleName);
    }

    /**
     * 砌体非抗震设计的抗剪强度设计值删除
     * @return
     */
    @GetMapping("/deleteCsValueById")
    public RestResponse deleteCsValueById(String csValueIds,String arrangeIds){
        return rcStructureService.deleteCsValueById(csValueIds,arrangeIds);
    }
}
